/*
MySQL Backup
Database: my_app
Backup Time: 2022-12-17 10:28:01
*/

SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `my_app`.`friends`;
DROP TABLE IF EXISTS `my_app`.`users`;
CREATE TABLE `friends` (
  `n_id` int NOT NULL AUTO_INCREMENT,
  `n_host_id` int NOT NULL,
  `s_host_name` varchar(50) NOT NULL,
  `n_guest_id` int NOT NULL,
  `s_guest_name` varchar(50) NOT NULL,
  PRIMARY KEY (`n_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `users` (
  `n_uid` int NOT NULL AUTO_INCREMENT,
  `s_username` varchar(50) NOT NULL,
  `s_password` varchar(50) NOT NULL DEFAULT '123456',
  `s_pic` varchar(255) NOT NULL,
  PRIMARY KEY (`n_uid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
BEGIN;
LOCK TABLES `my_app`.`friends` WRITE;
DELETE FROM `my_app`.`friends`;
INSERT INTO `my_app`.`friends` (`n_id`,`n_host_id`,`s_host_name`,`n_guest_id`,`s_guest_name`) VALUES (1, 1, '张三', 2, '李四'),(2, 1, '张三', 3, '王二'),(3, 1, '张三', 4, '麻子'),(4, 2, '李四', 1, '张三'),(5, 3, '王二', 1, '张三'),(6, 4, '麻子', 1, '张三'),(7, 3, '王二', 4, '麻子'),(8, 4, '麻子', 3, '王二');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `my_app`.`users` WRITE;
DELETE FROM `my_app`.`users`;
INSERT INTO `my_app`.`users` (`n_uid`,`s_username`,`s_password`,`s_pic`) VALUES (1, '张三', '123456', 'https://img.wxcha.com/m00/61/a6/c9e9c12108cc82c9552fa40d2e8153c2.jpg?down'),(2, '李四', '123456', 'https://img.wxcha.com/m00/63/af/8be100e62a2bf9f032666e56c1d0eb59.jpg?down'),(3, '王二', '123456', 'https://img.wxcha.com/m00/5b/a5/1aa52ed49777236c0a5dd594bf90ff83.jpg?down'),(4, '麻子', '123456', 'https://img.wxcha.com/m00/13/1e/84bd387605652981869d2afc48f8ebe4.jpg?down');
UNLOCK TABLES;
COMMIT;
